from models import *


def get_user_company(user):
    query = db.Query(Employment).filter("employee = " , user)
    if query.count() > 0:
        return query[0].company
    else:
        return None

def get_open_jobs():
    query = db.Query(Job).filter("is_open = ", True)
    return query